package com.ztil.socket.client;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketAddress;

public class Client {
	private SocketAddress address;
	private Socket socket;

	public void connect(String ip, int port, int timeout) {
		address = new InetSocketAddress(ip, port);
		socket = new Socket();
		try {
			socket.connect(address, timeout);
		} catch (IOException e) {
			e.printStackTrace();
		}
		new Handler(socket);
	}

}
